#pragma once

#include <glad/glad.h> // 包含glad来获取所有的必须OpenGL头文件
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>



#include <baseClass/Physical.h>

class Light: public Physical::Loaction
{
public:
    glm::vec3 ambientcolor = glm::vec3(1.0f, 1.0f, 1.0f);
    glm::vec3 diffusecolor = glm::vec3(1.0f, 1.0f, 1.0f);
    glm::vec3 specularcolor = glm::vec3(0.0f, 0.0f, 0.0f);

    void Setambientcolor(glm::vec3 color){
        ambientcolor = color;
    }
    void Setdiffusecolor(glm::vec3 color){
        diffusecolor = color;
    }
    void Setspecularcolor(glm::vec3 color){
        specularcolor = color;
    }
};


class DirLight: public Light
{
public:
    glm::vec3 direction = glm::vec3(0.0f, -1.0f, 0.0f);
    void Setdirection(glm::vec3 dir){
        direction = dir;
    }

};

class PointLight: public Light
{
public:
    float constant = 1.0f; // 点光源衰减常量
    float linear = 0.09f;  // 点光源衰减线性
    float quadratic = 0.032f; // 点光源衰减二次
    void Setconstant(float c){
        constant = c;
    }
    void Setlinear(float l){
        linear = l;
    }
    void Setquadratic(float q){
        quadratic = q;
    }
};

